#ifndef BITONICSORT_H
#define BITONICSORT_H

#include "sortingAlgorithm.h"

class BitonicSort : public SortingAlgorithm {
private:
    int * a;
    void merge(unsigned long ind, unsigned long cnt, bool asc = true);
    void compare(unsigned ind, unsigned long m, unsigned long cnt, bool asc = true);
    void sortImpl(unsigned long ind, unsigned long cnt, bool asc = true);
    unsigned long getPowerOfTwo(unsigned long n) const;
public:
    virtual void sort(Array * a);
};

#endif // SORTINGALGORITHMS_H
